All Questions
5 questions
3votes
2answers
590views
Find the longest sub string of a word after concatenation of given words array
An Array of N words is given. Each word consists of small letters ('a'-'z'). Our goal is to concatenate the words in such a way as to obtain a single word with longest possible substring composed of ...
1vote
1answer
499views
Reinterpreting a string, treating < as a backspace character
I've come up with a solution to this coding challenge using recursion. In summary, the input is a string where the < symbol represents a backspace (up to 1 ...
3votes
1answer
278views
Parsing n lines to count vowels - HackerEarth
I have written a haskell program for the following 'Code Monk' Challenge at HackerEarth. Here is the challenge description. Basically, we are looking for the number of vowels in a string. The first ...
10votes
2answers
449views
You need to diversify your strings
Challenge: Write a program which prints all the permutations of a string in alphabetical order. Specifications: Your program should accept a file as its first argument. The file contains input ...
5votes
3answers
5kviews
Using recursion to count substrings (with exceptions to the rule) in Java
I am going through the CodingBat exercises for Java. Here is the one I have just finished: Given a string, compute recursively the number of times lowercase hi ...